package com.ruoyi.report.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 商品报告表，包含产品详情和定价信息
 * @TableName walmart_item_report
 */
@TableName(value ="walmart_item_report")
@Data
public class WalmartItemReport implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)  // 设置主键和主键策略
    private Long id;
    /**
     * 来自源系统的唯一商品ID
     */
    @TableField(value = "item_id")
    private String itemId;

    /**
     * 库存单位（SKU） - 产品唯一标识符
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * 产品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 商品生命周期状态（例如：ACTIVE）
     */
    @TableField(value = "lifecycle_status")
    private String lifecycleStatus;

    /**
     * 商品发布状态（例如：PUBLISHED）
     */
    @TableField(value = "publish_status")
    private String publishStatus;

    /**
     * 最后状态变更的原因
     */
    @TableField(value = "status_change_reason")
    private String statusChangeReason;

    /**
     * 产品类别
     */
    @TableField(value = "product_category")
    private String productCategory;

    /**
     * 商品价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 价格使用的货币类型
     */
    @TableField(value = "currency")
    private String currency;

    /**
     * 商品在购买框中的价格
     */
    @TableField(value = "buy_box_item_price")
    private BigDecimal buyBoxItemPrice;

    /**
     * 购买框中的运费
     */
    @TableField(value = "buy_box_shipping_price")
    private BigDecimal buyBoxShippingPrice;

    /**
     * 建议零售价（MSRP）
     */
    @TableField(value = "msrp")
    private BigDecimal msrp;

    /**
     * 产品税号
     */
    @TableField(value = "product_tax_code")
    private String productTaxCode;

    /**
     * 发货方式
     */
    @TableField(value = "ship_methods")
    private String shipMethods;

    /**
     * 商品的运输重量
     */
    @TableField(value = "shipping_weight")
    private BigDecimal shippingWeight;

    /**
     * 运输重量单位（例如：kg）
     */
    @TableField(value = "shipping_weight_unit")
    private String shippingWeightUnit;

    /**
     * 履行延迟时间（天数）
     */
    @TableField(value = "fulfillment_lag_time")
    private Integer fulfillmentLagTime;

    /**
     * 履行类型
     */
    @TableField(value = "fulfillment_type")
    private String fulfillmentType;

    /**
     * WFS销售限制
     */
    @TableField(value = "wfs_sales_restriction")
    private String wfsSalesRestriction;

    /**
     * WPID（如果适用）
     */
    @TableField(value = "wpid")
    private String wpid;

    /**
     * 全球贸易项目编号
     */
    @TableField(value = "gtin")
    private String gtin;

    /**
     * 统一产品代码
     */
    @TableField(value = "upc")
    private String upc;

    /**
     * 商品页面URL
     */
    @TableField(value = "item_page_url")
    private String itemPageUrl;

    /**
     * 主图片URL
     */
    @TableField(value = "primary_image_url")
    private String primaryImageUrl;

    /**
     * 货架名称
     */
    @TableField(value = "shelf_name")
    private String shelfName;

    /**
     * 主要类别路径
     */
    @TableField(value = "primary_category_path")
    private String primaryCategoryPath;

    /**
     * 品牌名称
     */
    @TableField(value = "brand")
    private String brand;

    /**
     * 优惠开始日期
     */
    @TableField(value = "offer_start_date")
    private Date offerStartDate;

    /**
     * 优惠结束日期
     */
    @TableField(value = "offer_end_date")
    private Date offerEndDate;

    /**
     * 商品创建日期
     */
    @TableField(value = "item_creation_date")
    private Date itemCreationDate;

    /**
     * 商品最后更新时间
     */
    @TableField(value = "item_last_updated")
    private Date itemLastUpdated;

    /**
     * 商品的评论数量
     */
    @TableField(value = "reviews_count")
    private Integer reviewsCount;

    /**
     * 商品的平均评分
     */
    @TableField(value = "average_rating")
    private BigDecimal averageRating;

    /**
     * 是否可以搜索（Y/N）
     */
    @TableField(value = "searchable")
    private Object searchable;

    /**
     * 竞争对手的商品链接
     */
    @TableField(value = "competitor_url")
    private String competitorUrl;

    /**
     * 竞争对手的商品价格
     */
    @TableField(value = "competitor_price")
    private BigDecimal competitorPrice;

    /**
     * 竞争对手的运费
     */
    @TableField(value = "competitor_ship_price")
    private BigDecimal competitorShipPrice;

    /**
     * 最后一次获取竞争对手数据的日期
     */
    @TableField(value = "competitor_last_date_fetched")
    private Date competitorLastDateFetched;

    /**
     * 请求id
     */
    @TableField(value = "request_id")
    private String requestId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartItemReport other = (WalmartItemReport) that;
        return (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getLifecycleStatus() == null ? other.getLifecycleStatus() == null : this.getLifecycleStatus().equals(other.getLifecycleStatus()))
            && (this.getPublishStatus() == null ? other.getPublishStatus() == null : this.getPublishStatus().equals(other.getPublishStatus()))
            && (this.getStatusChangeReason() == null ? other.getStatusChangeReason() == null : this.getStatusChangeReason().equals(other.getStatusChangeReason()))
            && (this.getProductCategory() == null ? other.getProductCategory() == null : this.getProductCategory().equals(other.getProductCategory()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
            && (this.getBuyBoxItemPrice() == null ? other.getBuyBoxItemPrice() == null : this.getBuyBoxItemPrice().equals(other.getBuyBoxItemPrice()))
            && (this.getBuyBoxShippingPrice() == null ? other.getBuyBoxShippingPrice() == null : this.getBuyBoxShippingPrice().equals(other.getBuyBoxShippingPrice()))
            && (this.getMsrp() == null ? other.getMsrp() == null : this.getMsrp().equals(other.getMsrp()))
            && (this.getProductTaxCode() == null ? other.getProductTaxCode() == null : this.getProductTaxCode().equals(other.getProductTaxCode()))
            && (this.getShipMethods() == null ? other.getShipMethods() == null : this.getShipMethods().equals(other.getShipMethods()))
            && (this.getShippingWeight() == null ? other.getShippingWeight() == null : this.getShippingWeight().equals(other.getShippingWeight()))
            && (this.getShippingWeightUnit() == null ? other.getShippingWeightUnit() == null : this.getShippingWeightUnit().equals(other.getShippingWeightUnit()))
            && (this.getFulfillmentLagTime() == null ? other.getFulfillmentLagTime() == null : this.getFulfillmentLagTime().equals(other.getFulfillmentLagTime()))
            && (this.getFulfillmentType() == null ? other.getFulfillmentType() == null : this.getFulfillmentType().equals(other.getFulfillmentType()))
            && (this.getWfsSalesRestriction() == null ? other.getWfsSalesRestriction() == null : this.getWfsSalesRestriction().equals(other.getWfsSalesRestriction()))
            && (this.getWpid() == null ? other.getWpid() == null : this.getWpid().equals(other.getWpid()))
            && (this.getGtin() == null ? other.getGtin() == null : this.getGtin().equals(other.getGtin()))
            && (this.getUpc() == null ? other.getUpc() == null : this.getUpc().equals(other.getUpc()))
            && (this.getItemPageUrl() == null ? other.getItemPageUrl() == null : this.getItemPageUrl().equals(other.getItemPageUrl()))
            && (this.getPrimaryImageUrl() == null ? other.getPrimaryImageUrl() == null : this.getPrimaryImageUrl().equals(other.getPrimaryImageUrl()))
            && (this.getShelfName() == null ? other.getShelfName() == null : this.getShelfName().equals(other.getShelfName()))
            && (this.getPrimaryCategoryPath() == null ? other.getPrimaryCategoryPath() == null : this.getPrimaryCategoryPath().equals(other.getPrimaryCategoryPath()))
            && (this.getBrand() == null ? other.getBrand() == null : this.getBrand().equals(other.getBrand()))
            && (this.getOfferStartDate() == null ? other.getOfferStartDate() == null : this.getOfferStartDate().equals(other.getOfferStartDate()))
            && (this.getOfferEndDate() == null ? other.getOfferEndDate() == null : this.getOfferEndDate().equals(other.getOfferEndDate()))
            && (this.getItemCreationDate() == null ? other.getItemCreationDate() == null : this.getItemCreationDate().equals(other.getItemCreationDate()))
            && (this.getItemLastUpdated() == null ? other.getItemLastUpdated() == null : this.getItemLastUpdated().equals(other.getItemLastUpdated()))
            && (this.getReviewsCount() == null ? other.getReviewsCount() == null : this.getReviewsCount().equals(other.getReviewsCount()))
            && (this.getAverageRating() == null ? other.getAverageRating() == null : this.getAverageRating().equals(other.getAverageRating()))
            && (this.getSearchable() == null ? other.getSearchable() == null : this.getSearchable().equals(other.getSearchable()))
            && (this.getCompetitorUrl() == null ? other.getCompetitorUrl() == null : this.getCompetitorUrl().equals(other.getCompetitorUrl()))
            && (this.getCompetitorPrice() == null ? other.getCompetitorPrice() == null : this.getCompetitorPrice().equals(other.getCompetitorPrice()))
            && (this.getCompetitorShipPrice() == null ? other.getCompetitorShipPrice() == null : this.getCompetitorShipPrice().equals(other.getCompetitorShipPrice()))
            && (this.getCompetitorLastDateFetched() == null ? other.getCompetitorLastDateFetched() == null : this.getCompetitorLastDateFetched().equals(other.getCompetitorLastDateFetched()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getLifecycleStatus() == null) ? 0 : getLifecycleStatus().hashCode());
        result = prime * result + ((getPublishStatus() == null) ? 0 : getPublishStatus().hashCode());
        result = prime * result + ((getStatusChangeReason() == null) ? 0 : getStatusChangeReason().hashCode());
        result = prime * result + ((getProductCategory() == null) ? 0 : getProductCategory().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
        result = prime * result + ((getBuyBoxItemPrice() == null) ? 0 : getBuyBoxItemPrice().hashCode());
        result = prime * result + ((getBuyBoxShippingPrice() == null) ? 0 : getBuyBoxShippingPrice().hashCode());
        result = prime * result + ((getMsrp() == null) ? 0 : getMsrp().hashCode());
        result = prime * result + ((getProductTaxCode() == null) ? 0 : getProductTaxCode().hashCode());
        result = prime * result + ((getShipMethods() == null) ? 0 : getShipMethods().hashCode());
        result = prime * result + ((getShippingWeight() == null) ? 0 : getShippingWeight().hashCode());
        result = prime * result + ((getShippingWeightUnit() == null) ? 0 : getShippingWeightUnit().hashCode());
        result = prime * result + ((getFulfillmentLagTime() == null) ? 0 : getFulfillmentLagTime().hashCode());
        result = prime * result + ((getFulfillmentType() == null) ? 0 : getFulfillmentType().hashCode());
        result = prime * result + ((getWfsSalesRestriction() == null) ? 0 : getWfsSalesRestriction().hashCode());
        result = prime * result + ((getWpid() == null) ? 0 : getWpid().hashCode());
        result = prime * result + ((getGtin() == null) ? 0 : getGtin().hashCode());
        result = prime * result + ((getUpc() == null) ? 0 : getUpc().hashCode());
        result = prime * result + ((getItemPageUrl() == null) ? 0 : getItemPageUrl().hashCode());
        result = prime * result + ((getPrimaryImageUrl() == null) ? 0 : getPrimaryImageUrl().hashCode());
        result = prime * result + ((getShelfName() == null) ? 0 : getShelfName().hashCode());
        result = prime * result + ((getPrimaryCategoryPath() == null) ? 0 : getPrimaryCategoryPath().hashCode());
        result = prime * result + ((getBrand() == null) ? 0 : getBrand().hashCode());
        result = prime * result + ((getOfferStartDate() == null) ? 0 : getOfferStartDate().hashCode());
        result = prime * result + ((getOfferEndDate() == null) ? 0 : getOfferEndDate().hashCode());
        result = prime * result + ((getItemCreationDate() == null) ? 0 : getItemCreationDate().hashCode());
        result = prime * result + ((getItemLastUpdated() == null) ? 0 : getItemLastUpdated().hashCode());
        result = prime * result + ((getReviewsCount() == null) ? 0 : getReviewsCount().hashCode());
        result = prime * result + ((getAverageRating() == null) ? 0 : getAverageRating().hashCode());
        result = prime * result + ((getSearchable() == null) ? 0 : getSearchable().hashCode());
        result = prime * result + ((getCompetitorUrl() == null) ? 0 : getCompetitorUrl().hashCode());
        result = prime * result + ((getCompetitorPrice() == null) ? 0 : getCompetitorPrice().hashCode());
        result = prime * result + ((getCompetitorShipPrice() == null) ? 0 : getCompetitorShipPrice().hashCode());
        result = prime * result + ((getCompetitorLastDateFetched() == null) ? 0 : getCompetitorLastDateFetched().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", itemId=").append(itemId);
        sb.append(", sku=").append(sku);
        sb.append(", productName=").append(productName);
        sb.append(", lifecycleStatus=").append(lifecycleStatus);
        sb.append(", publishStatus=").append(publishStatus);
        sb.append(", statusChangeReason=").append(statusChangeReason);
        sb.append(", productCategory=").append(productCategory);
        sb.append(", price=").append(price);
        sb.append(", currency=").append(currency);
        sb.append(", buyBoxItemPrice=").append(buyBoxItemPrice);
        sb.append(", buyBoxShippingPrice=").append(buyBoxShippingPrice);
        sb.append(", msrp=").append(msrp);
        sb.append(", productTaxCode=").append(productTaxCode);
        sb.append(", shipMethods=").append(shipMethods);
        sb.append(", shippingWeight=").append(shippingWeight);
        sb.append(", shippingWeightUnit=").append(shippingWeightUnit);
        sb.append(", fulfillmentLagTime=").append(fulfillmentLagTime);
        sb.append(", fulfillmentType=").append(fulfillmentType);
        sb.append(", wfsSalesRestriction=").append(wfsSalesRestriction);
        sb.append(", wpid=").append(wpid);
        sb.append(", gtin=").append(gtin);
        sb.append(", upc=").append(upc);
        sb.append(", itemPageUrl=").append(itemPageUrl);
        sb.append(", primaryImageUrl=").append(primaryImageUrl);
        sb.append(", shelfName=").append(shelfName);
        sb.append(", primaryCategoryPath=").append(primaryCategoryPath);
        sb.append(", brand=").append(brand);
        sb.append(", offerStartDate=").append(offerStartDate);
        sb.append(", offerEndDate=").append(offerEndDate);
        sb.append(", itemCreationDate=").append(itemCreationDate);
        sb.append(", itemLastUpdated=").append(itemLastUpdated);
        sb.append(", reviewsCount=").append(reviewsCount);
        sb.append(", averageRating=").append(averageRating);
        sb.append(", searchable=").append(searchable);
        sb.append(", competitorUrl=").append(competitorUrl);
        sb.append(", competitorPrice=").append(competitorPrice);
        sb.append(", competitorShipPrice=").append(competitorShipPrice);
        sb.append(", competitorLastDateFetched=").append(competitorLastDateFetched);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}